<?php
/**********************
**top.inc
**Date Created: 4/13/2009
**Copyright 2009 Tomorrow Tech Industries
**Contact: RPITomorrowTech@gmail.com
**********************/

require_once("login.inc");

function top($page)
{
	return topEnhanced($page, '');
}

//For top's that require header data
function topEnhanced($page, $header)
{
	enforceLoggedIn();
	echo "
		<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
		<HTML xmlns=\"http://www.w3.org/1999/xhtml\">
		<HEAD>
		";
	//Defines the character set used
	echo "<META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
	//Additional header information
	echo $header;
	
	echo "	
		<TITLE>Intellimation " . $page . "</TITLE>
		
		<STYLE type=\"text/css\">
		<!--
		body {
			margin-right: 500px;
		}
		.style1 {font-size: 9px}
		-->
		</STYLE>
		</HEAD>
		
		<BODY>
		<H1>Intellimation [" . $page . "]</H1> 
		";
	
	echo '<DIV align="right">Logged in as '. $_SESSION[SESSION_USER_NAME].'.<BR><A href="logout.php">Logout.</A></DIV>';
	
	echo "<BR>\n";
	
	echo '<DIV align="right">';
	echo "<A href=\"register.php\">Register New User</A>
		| <A href=\"help.php\">Help</A>
		";
	echo '</DIV>';

	echo '<DIV align="left">';
		//These were originally intended to be tabs
		echo "
			<A href=\"main.php\">Main</A> 
			| <A href=\"timers.php\">Timers</A> 
			| <A href=\"presets.php\">Presets Manager</A>
			| <A href=\"addstrip.php\">Add Strip</A>
			| <A href=\"reconfiguredevice.php\">Reconfigure Devices</A>
			";
	echo '</DIV>';

	//Big line seperator
	echo "<HR />";

	//echo "<h3>Main Window:</h3>";
	echo "
		<BR />
		<BR />
		";	
}
?>
